home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Graphics / StereoScope / Source / AzimuthMat.h next >
Text File  |  1994-04-01  |  944b  |  33 lines

  1. #import "PerspMat.h"
  2.  
  3. @interface AzimuthMat : PerspMat
  4.  /* A special class of perspective matrices where the viewpoint is */
  5.  /* determined by an azimuth angle (theta), an elevation angle (phi), */
  6.  /* and a distance to the viewpoint.  The limits are the ranges of the */
  7.  /* three coordinates.  The resulting projected points are in the */
  8.  /* range [-1,1] */
  9. {
  10.   float theta, c_theta, s_theta, phi, c_phi, s_phi, dist, limits[6];
  11.   float to_theta_cache[16], to_phi_cache[16], to_dist_cache[16];
  12.   BOOL  is_cached_to_theta, is_cached_to_phi, is_cached_to_dist;
  13. }
  14.  
  15. /* Factory Methods */
  16.  
  17. +new;     // as identity matrix with limits of [0,1] for all coordinates
  18. +newLimits:(float *)newlimits;
  19.  
  20. /* Public Methods */
  21.  
  22. -reset;
  23. -setlimits:(float *)newlimits;
  24. -setTheta:(float) radians;
  25. -setPhi:(float) radians;
  26. -setdist:(float) distance;
  27. -setinvdist:(float) invdistance;
  28. -(float)getTheta:sender;
  29. -(float)getPhi:sender;
  30. -(float)getdist:sender;
  31.  
  32. @end
  33.